home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / CLIPBD_U / CLPBRD / CLIPBRD.TXT < prev    next >
Text File  |  1994-09-15  |  7KB  |  244 lines

  1.  Unit ClipBrd
  2.  ▀▀▀▀▀▀▀▀▀▀▀▀
  3.  
  4. The ClipBrd unit provides a clipboard for DOS and DPMI programs, which
  5. is accessible in Windows' style. When your application is running in
  6. a DOS box under Windows, Windows's clipboard functions are used.
  7. If it is not, the functions are efficiently emulated.
  8.  
  9. So your programs can take part in dynamical data exchange (DDE), though
  10. not being dependent on Windows.
  11.  
  12.  Unit ClipBrd: Functions and Procedures 
  13.  Unit ClipBrd: Variables                
  14.  Clipboard Format Constants             
  15.  
  16.  Using Windows' Clipboard               
  17.  Clipboard Emulation                    
  18.  Force Clipboard Emulation              
  19.  
  20.  Copyright                              
  21.  
  22.  Unit ClipBrd: Functions and Procedures
  23.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  24.  
  25.  CloseClipboard      
  26.  EmptyClipboard      
  27.  ForceEmulation      
  28.  GetClipboardData    
  29.  GetClipboardDataSize
  30.  OpenClipboard       
  31.  SetClipboardData    
  32.  
  33.  See also:  Unit ClipBrd
  34.  
  35.  Unit ClipBrd: Variables
  36.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  37.  
  38.  var
  39.    WinOldAp: Boolean;        READ ONLY
  40.  
  41. The main of the ClipBrd unit stores the result of the test whether running
  42. inside a DOS box into this variable.
  43.  
  44.  See also:  Unit ClipBrd
  45.  
  46.  
  47.  CloseClipboard         (Unit ClipBrd)
  48.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  49.  
  50.  function CloseClipboard: Boolean;
  51.  
  52. This function closes the clipboard, such that other applications may
  53. access it.
  54.  
  55.  Returns:  true if successful
  56.  
  57. In the emulating mode, CloseClipboard is without function. It always
  58. returns TRUE.
  59.  
  60.  
  61.  EmptyClipboard         (Unit ClipBrd)
  62.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  63.  
  64.  function EmptyClipboard: Boolean;
  65.  
  66. This function empties the clipboard. Before calling EmptyClipboard,
  67. the clipboard must be opened by OpenClipboard.
  68.  
  69.  Returns:  true if successful
  70.  
  71.  
  72.  ForceEmulation         (Unit ClipBrd)
  73.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  74.  
  75.  procedure ForceEmulation;
  76.  
  77. This procedure forces emulating the clipboard, i.e. it disables the
  78. use of Windows' clipboard.
  79.  
  80.  
  81.  GetClipboardData       (Unit ClipBrd)
  82.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  83.  
  84.  function GetClipboardData(Format: Word; var Data): Boolean;
  85.  
  86. This function fills the buffer Data with a copy of the contents of
  87. the clipboard in the specified format. Before calling GetClipboardData,
  88. the clipboard must be opened by OpenClipboard.
  89.  
  90.  Returns:  true if successful
  91.  
  92. For the Format parameter, use the format constants cf_XXXX.
  93.  
  94.  
  95.  GetClipboardDataSize   (Unit ClipBrd)
  96.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  97.  
  98.  function GetClipboardDataSize(Format: Word): LongInt;
  99.  
  100. This function retrieves the size of the clipboard data in the specified
  101. format.
  102.  
  103.  Returns:  Byte size of the data.
  104.  
  105. For the Format parameter, use the format constants cf_XXXX.
  106.  
  107.  
  108.  OpenClipboard          (Unit ClipBrd)
  109.  ▀▀▀▀▀▀▀▀▀▀▀▀▀
  110.  
  111.  function OpenClipboard: Boolean;
  112.  
  113. This function opens the clipboard for the calling program, and locks it
  114. for any other application.
  115.  
  116.  Returns:  true if successful
  117.  
  118. In the emulating mode, CloseClipboard is without function. It always
  119. returns TRUE.
  120.  
  121.  
  122.  SetClipboardData       (Unit ClipBrd)
  123.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  124.  
  125.  function SetClipboardData(Format: Word; var Data; Size: LongInt): Boolean;
  126.  
  127. This function inserts data in the specified format into the clipboard.
  128. Before calling SetClipboardData, the clipboard must be opened by
  129. OpenClipboard. If there were alreeady data in this format, they are
  130. replaced by the new data.
  131.  
  132. After the call, the memory block Data belongs to the clipboard. The
  133. program may not access it any more.
  134.  
  135.  Returns:  true if successful
  136.  
  137.  Parameter  Description
  138.  ───────────────────────────────────────────────────────────
  139.  Format     Data format (Constants cf_XXXX).
  140.  Data       Memory block (on heap), representing the data
  141.  Size       Byte size of the memory block.
  142.  
  143.  
  144.  cf_XXXX: Clipboard Format Constants
  145.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  146.  
  147.  Constant         Description
  148.  ───────────────────────────────────────────────────────────────────────────
  149.  cf_Text          ANSI text (used by Windows applications). Each line is
  150.                   ended by CR-LF, the text is ended by NUL.
  151.  cf_Bitmap        Windows bitmap.
  152.  cf_MetaFilePict  Windows metafile.
  153.  cf_SYLK          MS Symbolic Link Format.
  154.  cf_DIF           Software Arts' Data Interchange Format.
  155.  cf_TIFF          Tag Image File Format.
  156.  cf_OEMText       OEM text (used by DOS applications). Each line is
  157.                   ended by CR-LF, der text is ended by NUL.
  158.  cf_DIB           A memory block including a TBitmapInfo structure,
  159.                   followed by bitmap data.
  160.  cf_Palette       Windows palette.
  161.  
  162.  
  163.  See also:  Unit ClipBrd
  164.  
  165.  
  166.  Clipboard Emulation
  167.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  168.  
  169. When your application is running outside Windows, the clipboard functions
  170. are emulated.
  171.  
  172.  * The main installs an ExitProc, freeing
  173.    all clipboard data on exit.
  174.  
  175.  * OpenClipboard und CloseClipboard are
  176.    without function because the clipboard
  177.    is used by only one program.
  178.  
  179.  See also:  Unit ClipBrd
  180.  
  181.  
  182.  Using Windows' Clipboard
  183.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  184.  
  185. When your application is running inside a DOS box of Windows, Windows'
  186. clipboard functions are used.
  187.  
  188. Since Windows rounds up the size of the memory blocks, the size returned
  189. by GetClipboardDataSize needs not match this specified at a
  190. SetClipboardData call.
  191.  
  192. Take care that you will dispose the whole block, and not only the memory
  193. area used. That means, e.g. use FreeMem instead of StrDispose.
  194.  
  195.  See also:  Unit ClipBrd
  196.  
  197.  
  198.  Copyright and
  199.  Disclaimer of Warranty
  200.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  201.  
  202. The files of the software product provided as a whole are called Software.
  203.  
  204.  Copyright
  205.  
  206.  The Software is neither "Public Domain",
  207.  nor "Freeware". The Software is protected
  208.  by the laws of the Federal Republic of
  209.  Germany and international agreements.
  210.  
  211.  Copyright (C) 1993, 1994 Matthias Köppe,
  212.  Erzbergerstraße 12, D-39104 Magdeburg.
  213.  All rights reserved.
  214.  
  215.  Disclaimer of Warranty
  216.  
  217.  The Software is supplied as is. The authors
  218.  disclaim all warranties, expressed or
  219.  implied, including but not limited to the
  220.  warranties of merchantability and of fitness
  221.  for any purpose. The authors assume no
  222.  liability for damages, direct or
  223.  consequential, which may result from
  224.  the use of the Software.
  225.  
  226.  General Agreement
  227.  
  228.  Using the Software, you agree to the general
  229.  agreement, which is stated in the file
  230.  SOFTWARE.DOC.
  231.  
  232.  If you have a copy of the Software that
  233.  doesn't include this file, refer to:
  234.  
  235.  Matthias Koeppe
  236.  MKM GbR f. Softwareentwicklung
  237.  Erzbergerstraße 12
  238.  D-39104 Magdeburg
  239.  GERMANY
  240.  
  241.  Phone/Fax  +49-391-5 43 01 28
  242.  CIS        [100331,174]
  243.  
  244.